<template>
<span :class="wrapper_name">
  <btn_group v-if="btns.task_block&&task_block" @btnClick="btnClick" :btns="task_block" field="task_block" title="系统" :confirm="false" :def="task_block[0].id"></btn_group>
</span>
</template>
<script type="text/ecmascript-6">
  import tool from 'src/util/tool';
  import util from '_util/index';
  import logic from '_logic';
  import in_array from 'in_array';

  import btn_group from 'components/common/btn_group';


  export default {
    data() {
      return {
          task_block: null
      }
    },
    components: {
        btn_group
    },
    methods: {
      tocopy(){

      },
        btnClick(flag, field){
            this.$router.push(`/page/list?ctl=Taskcom&${field}=${flag}`);
        },
        getBtns(){
            let obj =
                {
                    'task_block': 'task_block'
                };

            logic.list.getListOpBtns(this, obj);
        }
    },
    computed: {
      ctl(){
        return this.$route.query.ctl;
      },
      is_admin(){
        return util.is_admin(this);
      },
    },
    props: ['wrapper_name','btns'],
    created() {
        this.getBtns()
    },
  };
</script>
<style rel="stylesheet/less" lang="less">@dir: "header/";</style>
